<template>
  <section id="login">
    <header class="header">
      <h2 class="title">login</h2>
      <span class="close">×</span>
    </header>
    <div class="container">
      <span class="tips">
        <i class="sign">*</i>用户名：
      </span>
      <div class="input">
        <el-input v-model="username"
                  placeholder="请输入用户名"
                  size="medium"></el-input>
      </div>
      <span class="tips">
        <i class="sign">*</i>密码：
      </span>
      <div class="input">
        <el-input v-model="password"
                  type="password"
                  placeholder="请输入密码"
                  size="medium"></el-input>
      </div>
      <el-button type="primary"
                 size="medium">login</el-button>
    </div>
  </section>
</template>

<script>
export default {
  data () {
    return {
      username: '',
      password: ''
    }
  }
}
</script>

<style lang="less" scoped>
#login {
  margin: 100px auto;
  width: 460px;
  height: 280px;
  border-radius: 5px;
  background-color: #fff;

  .header {
    width: 100%;
    height: 55px;
    box-sizing: border-box;
    padding: 16px 24px;
    position: relative;
    border-bottom: 1px solid #ccc;

    .title {
      display: inline-block;
      font-size: 16px;
    }
    .close {
      font-size: 20px;
      position: absolute;
      right: 24px;
      cursor: pointer;
    }
  }
  .container {
    box-sizing: border-box;
    width: 100%;
    padding: 24px;

    .tips {
      display: inline-block;
      width: 103px;
      text-align: right;
      font-size: 14px;

      .sign {
        color: #f00;
        font-size: 20px;
        vertical-align: middle;
        margin-right: 5px;
      }
    }
    .input {
      display: inline-block;
      width: 309px;
      margin-bottom: 24px;
    }
    .el-button {
      width: 100%;
    }
  }
}
</style>